import httpInstance from '@/utils/http'

export function getHomeDataAPI() {
  return httpInstance({
    url: '/home',
    method: 'GET'
  })
}

// 获取banner
export function getBannerAPI(params = {}) {
  // 默认为1 商品为2
  const { distributionSite = '1' } = params
  return httpInstance({
    url: '/home/banner',
    method: 'GET',
    params: {
      distributionSite
    }
  })
}

export function searchAPI(keyword) {
  return httpInstance({
    url: '/home/search',
    method: 'GET',
    params: {
      keyword
    }
  })
}

// export const getGoodsAPI = () => {
//   return httpInstance({
//     url: '/home/goods',
//     method: 'GET'
//   })
// }